/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package matematikapirma.gui;

import java.awt.geom.Ellipse2D;
import matematikapirma.Curve;
import matematikapirma.Point;

/**
 *
 * @author Tadas
 */
public class GuiPoint extends Ellipse2D.Double {

    public final static int SIZE = 10;
    private Point point;
    private Curve curve;

    protected GuiPoint(Point point, Curve curve, int size){
        super(point.getX() - size / 2, point.getY() - size / 2, size, size);
        this.curve = curve;
        this.point = point;
    }

    public GuiPoint(Point point) {
        this(point, null, SIZE);
    }

    public GuiPoint(Point point, Curve curve){
        this(point, curve, SIZE);
    }

    public Point getPoint(){
        return point;
    }

    public boolean hasCurve(){
        return curve != null;
    }

    public Curve getCurve(){
        return curve;
    }
}
